/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import DTO.QUYDINH;
import java.sql.Connection;
import java.sql.ResultSet;

public class QuyDinhDAO {
     Connect con = new Connect();
     Connection cont;
    public QuyDinhDAO()
    {
          cont = con.Connect("sa","123456");
    }
     public ResultSet Getdata()
    {
        String sqlGetData= "select * from THAMSO";
        return con.GetdataTable(sqlGetData);
    }
     public void Update(QUYDINH qd)
     {
           String sqlUpdate = "Update THAMSO set Giatri=" + qd.getGiatri() + ",tinhtrang="+qd.getTinhtrang()+" where mats='" +qd.getMats() + "'";
           con.Update(sqlUpdate, null, false);
     }
}
